Desktop Manager Routines
Desktop Manager Routines
All low-level desktop manager routines exchange parameters with your
application through a parameter block. When calling a low-level routine, you
pass a pointer to the parameter block.
Three Desktop Manager functions-namely, PBDTGetPath,
PBDTOpenInform, and PBDTCloseDown-run synchronously only. All
other Desktop Manager routines can run either asynchronously or
synchronously. There are three versions of each of these routines. The first
version takes two parameters: a pointer to the parameter block, and a Boolean
value that determines whether the routine is run asynchronously (TRUE) or
synchronously (FALSE). Here, for example, is the first version of a routine
that retrieves the user's comment stored for a file or a directory:
OSErr PBDTGetComment (DTPBPtr paramBlock, Boolean async);
The second version does not take a second parameter; instead, it adds the
suffix "Async" to the name of the routine:
OSErr PBDTGetCommentAsync (DTPBPtr paramBlock);
Similarly, the third version of the routine does not take a second parameter;
instead, it adds the suffix "Sync" to the name of the routine:
OSErr PBDTGetCommentSync (DTPBPtr paramBlock);
All Desktop Manager routines that have separate synchronous and
asynchronous versions are documented using the first version only. Note,
however, that the second and third versions of these routines do not use the
glue code that the first versions use and are therefore more efficient.